package net.root.plain.alarm;

public class WeekUtil {
	public static final int MON = 1;
	public static final int TUE = 1 << 1;
	public static final int WED = 1 << 2;
	public static final int THU = 1 << 3;
	public static final int FRI = 1 << 4;
	public static final int SAT = 1 << 5;
	public static final int SUN = 1 << 6;
	public static String week(int week) {
		StringBuffer sb = new StringBuffer();
		if ((week & MON) != 0) {
			sb.append("월,");
		}
		if ((week & TUE) != 0) {
			sb.append("화,");
		}
		if ((week & WED) != 0) {
			sb.append("수,");
		}
		if ((week & THU) != 0) {
			sb.append("목,");
		}
		if ((week & FRI) != 0) {
			sb.append("금,");
		}
		if ((week & SAT) != 0) {
			sb.append("토,");
		}
		if ((week & SUN) != 0) {
			sb.append("일,");
		}
		sb.deleteCharAt(sb.length()-1);
		return sb.toString();
	}
}
